package com.cdz.charger.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.cdz.common.annotation.Excel;
import com.cdz.common.core.domain.BaseEntity;

/**
 * 充电会话对象 charging_session
 *
 * @author baefengk2
 * @date 2025-03-10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("充电会话实体")
public class ChargingSession extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 充电桩id
     */
    @Excel(name = "充电桩id")
    @ApiModelProperty(value = "充电桩id")
    private Long chargerId;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;

    /**
     * 消耗的能量(千瓦时（kWh）)
     */
    @Excel(name = "消耗的能量(千瓦时", readConverterExp = "k=Wh")
    @ApiModelProperty(value = "消耗的能量(千瓦时")
    private double energyConsumed;

}